package com.itcast.contraller;

import com.itcast.pojo.OperateLog;
import com.itcast.pojo.PageResult;
import com.itcast.pojo.Result;
import com.itcast.service.OperateLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
public class LogController {
    @Autowired
    private OperateLogService operateLogService;
    @GetMapping("/log/page")
    public Result selectOperateLog(Integer page,Integer pageSize){
        log.info("日志查询页码:{},每页记录数{}",page,pageSize);
        PageResult<OperateLog> logList = operateLogService.selectOperateLog( page,pageSize);
        return Result.success(logList);
    }
}
